package t2.client.events;

import com.google.gwt.event.shared.GwtEvent;

public class RemoteAtCmdEvent extends GwtEvent<RemoteAtCmdHandler>{
    
    public static Type<RemoteAtCmdHandler>  TYPE = new Type<RemoteAtCmdHandler>();
    private int[] dest64;
    private String command;


    /* Main needs to know if a parameter was passed in when the event was called.
     * 0xFFFF indicates param is unused, so it's a query instead of a change. */
    private int param = 0xFFFF;
    
    
    public RemoteAtCmdEvent(int[] dest64, String command){
        setDest64(dest64);
        setCommand(command);
    }

    
    public RemoteAtCmdEvent(int[] dest64, String command, int param){
        setDest64(dest64);
        setCommand(command);
        setParam(param);
    }
    
    
    @Override
    public com.google.gwt.event.shared.GwtEvent.Type<RemoteAtCmdHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(RemoteAtCmdHandler handler) {
        handler.sendRemoteAtRequest(this);
    }


    public int[] getDest64() {
        return dest64;
    }
    public void setDest64(int[] dest64) {
        this.dest64 = dest64;
    }
    public String getCommand() {
        return command;
    }
    public void setCommand(String command) {
        this.command = command;
    }
    public int getParam() {
        return param;
    }
    public void setParam(int param) {
        this.param = param;
    }
}